home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98c.txt
/
000045_icon-group-sender _Wed Sep 23 12:28:05 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) with SMTP id MAA15462
for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Wed, 23 Sep 1998 12:28:04 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA11839; Wed, 23 Sep 1998 12:27:35 -0700
To: icon-group@optima.CS.Arizona.EDU
Date: Wed, 23 Sep 1998 17:16:05 GMT
From: neitzel@gaertner.de (Martin Neitzel)
Message-Id: <EzqyMu.DDG@gaertner.de>
Organization: Gaertner Datensysteme, Braunschweig, Germany
Sender: icon-group-request@optima.CS.Arizona.EDU
References: <6u4cgj$dhm$0@205.138.136.164>, <6u8t4c$h7f$0@205.138.136.110>
Subject: Re: Novice Question: how to fill a text box with a directory listing
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
> chdir("/opt/oshs/progs/in")
> dir := open("ls *.jpg", "p")
> [...]
> while put(pictlist, read(dir))
Works probably great now but might fail next February. The shell has to
expand "ls *.jpg" and when your collection of pictures grows too big the
limited command line buffer will overflow. A better programmatic
interface would be:
> dir := open ("find /opt/oshs/progs/in -name '*.jpg'", "p")
See the manual page for find(1) if you need to restrict the
search to just the first directory level and zillions of other
paraphernalia. The important point is that the rest remains
as is:
read(dir)
will return the filenames. Depending on how you invoke "find",
you have to strip the pathname away, but hey, piecocake in Icon.
Caveat: My Icon is way too rusty to say whether it provides something
special for searching files without a separate process.
Martin Neitzel